<?php
class pAdminAction extends pBaseAction{

    public function index(){
        $this->display();
    }

    public function portal(){
        $this->display();
    }

    /**
     * 个人设置
     */
    public function profile(){
        $this->assign('userVo',$_SESSION[C('USER_AUTH_KEY')]['user']);
        $this->display();
    }

    /**
     * 保存个人设置
     */
     public function saveProfile(){
        $editType = $_POST['editype'];
        if($editType == 'myinfo' || $editType == 'pwd'){        //修改个人信息
            $dao=new UserModel();
            if($dao->updateMyself()){
                $this->ajaxReturn(null,L('update_profile_success'),true);
            }else{
                $this->ajaxReturn(null,L('update_profile_fail'),false);
            }
        }
     }



}